#include <iostream>
#include <sys/timeb.h>
#include <time.h>

#include "CTorus.h"

using namespace std;

int main(int argc, char **argv)
{
	if(argc<2) {
		cout << "Usage: " << argv[0] << " <rows> <columns>" << endl;
		exit(-1);
	}

	CTorus torus(atoi(argv[1]), atoi(argv[2]));

	cout << "current position = (0,0)" << endl;
	pair<long,long> pos;
	pos.first = 0;
	pos.second = 0;

	cout << endl;
	cout << "movement start --------------------------" << endl;

	torus.up(pos);
	cout << "up position = (" << pos.first << "," << pos.second << ")" << endl;

	torus.left(pos);
	cout << "left position = (" << pos.first << "," << pos.second << ")" << endl;

	torus.down(pos);
	cout << "down position = (" << pos.first << "," << pos.second << ")" << endl;

	torus.right(pos);
	cout << "right position = (" << pos.first << "," << pos.second << ")" << endl;

	cout << endl;
	cout << "final position should be (0,0)" << endl;
}
